package com.lms.dto;

import java.util.ArrayList;
import java.util.List;

import com.lms.domain.NewTraining;

public class NewTrainingMapper {
	
	public static NewTrainingDto map(NewTraining training){
		System.out.println("\n\n\n\n\n\n\n aaaaaaaaaaaaagh "+ training.getTrainingId());
		
		NewTrainingDto dto = new NewTrainingDto();
		
		dto.setTrainingId(training.getTrainingId());
		dto.setTrainingName(training.getTrainingName());
		dto.setDescription(training.getDescription());
		
		return dto;
	}
	
	public static List<NewTrainingDto> map(List<NewTraining> trainings) {
		List<NewTrainingDto> dtos = new ArrayList<NewTrainingDto>();
		for (NewTraining training: trainings) {
			dtos.add(map(training));
		}
		return dtos;
	}
}
